package com.example.sprintboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.List;

@Data
@TableName("category")
public class Category {
    @TableId(value = "category_id",type = IdType.AUTO)
    private Integer categoryId;
    private String name;
    @TableField("parent_id")
    private Integer parentId;
    @TableField("is_leaf")
    private Integer isLeaf;
    private Integer level;
    @TableField(exist = false)
    private List<Category> children;
}
